﻿<%@ Page Title="" Language="C#" MasterPageFile="~/manager.Master" AutoEventWireup="true" CodeBehind="change_Detail_user.aspx.cs" Inherits="Bus_proj.website.change_Detail_user" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <link href="../Styles/Stylebuttoncss.css" rel="stylesheet" type="text/css" />
    <link href="../Styles/textbox.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        .style1
        {
            width: 100%;
        }
        .style2
        {
            width: 395px;
        }
        .style3
        {
            width: 395px;
            height: 21px;
        }
        .style4
        {
            height: 21px;
        }
        .style5
        {
            width: 201px;
        }
        .style6
        {
            width: 209px;
        }
        .style7
        {
            width: 73px;
        }
        .style8
        {
            width: 121px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
    <Triggers>
    <asp:AsyncPostBackTrigger ControlID="Button1" EventName="Click" />
    <asp:AsyncPostBackTrigger ControlID="Button2" EventName="Click" />    
    </Triggers>
<fieldset class="el02">
<legend>แก้ไขข้อมูลสมาชิก</legend>
    <table class="style1">
        <tr>
            <td align="right" class="style5">
                &nbsp;</td>
            <td class="style6">
                &nbsp;</td>
            <td class="style7">
                &nbsp;</td>
            <td align="right" class="style8">
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td align="right" class="style5">
                <asp:Label ID="Label18" runat="server" Text="รหัสสมาชิก :"></asp:Label>
            </td>
            <td class="style6">
                <asp:TextBox ID="TextBox18" runat="server" ReadOnly="True" CssClass="textbox"></asp:TextBox>
            </td>
            <td class="style7">
                &nbsp;</td>
            <td align="right" class="style8">
                <asp:Label ID="Label7" runat="server" Text="บ้านเลขที่"></asp:Label>
                :</td>
            <td>
                <asp:TextBox ID="TextBox5" runat="server" CssClass="textbox"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" ControlToValidate="TextBox5"
                Display="Dynamic" ErrorMessage="Amount is required.">*</asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td align="right" class="style5">
                <asp:Label ID="Label1" runat="server" Text="คำนำหน้า :"></asp:Label>
            </td>
            <td class="style6">
                <asp:DropDownList ID="DropDownList1" runat="server" CssClass="textbox">
                    <asp:ListItem>นาย</asp:ListItem>
                    <asp:ListItem>นาง</asp:ListItem>
                    <asp:ListItem>นางสาว</asp:ListItem>
                </asp:DropDownList>
            </td>
            <td class="style7">
                &nbsp;</td>
            <td align="right" class="style8">
                <asp:Label ID="Label8" runat="server" Text="หมู่"></asp:Label>
                :</td>
            <td>
                <asp:TextBox ID="TextBox6" runat="server" CssClass="textbox"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator9" runat="server" ControlToValidate="TextBox5"
                Display="Dynamic" ErrorMessage="Amount is required.">*</asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td align="right" class="style5">
                <asp:Label ID="Label2" runat="server" Text="ชื่อ :"></asp:Label>
            </td>
            <td class="style6">
                <asp:TextBox ID="TextBox1" runat="server" CssClass="textbox"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TextBox1"
                Display="Dynamic" ErrorMessage="Amount is required.">*</asp:RequiredFieldValidator>
            </td>
            <td class="style7">
                &nbsp;</td>
            <td align="right" class="style8">
                <asp:Label ID="Label17" runat="server" Text="ซอย"></asp:Label>
                :</td>
            <td>
                <asp:TextBox ID="TextBox12" runat="server" CssClass="textbox"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td align="right" class="style5">
                <asp:Label ID="Label3" runat="server" Text="นามสกุล :"></asp:Label>
            </td>
            <td class="style6">
                <asp:TextBox ID="TextBox2" runat="server" CssClass="textbox"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="TextBox2"
                Display="Dynamic" ErrorMessage="Amount is required.">*</asp:RequiredFieldValidator>
            </td>
            <td class="style7">
                &nbsp;</td>
            <td align="right" class="style8">
                <asp:Label ID="Label9" runat="server" Text="ถนน"></asp:Label>
                :</td>
            <td>
                <asp:TextBox ID="TextBox7" runat="server" CssClass="textbox"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td align="right" class="style5">
                <asp:Label ID="Label4" runat="server" Text="เลขบัตรประชาชน :"></asp:Label>
            </td>
            <td class="style6">
                <asp:TextBox ID="TextBox3" runat="server" CssClass="textbox"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="TextBox3"
                Display="Dynamic" ErrorMessage="Amount is required.">*</asp:RequiredFieldValidator>
            </td>
            <td class="style7">
                &nbsp;</td>
            <td align="right" class="style8">
                <asp:Label ID="Label12" runat="server" Text="จังหวัด"></asp:Label>
                :</td>
            <td>
                <asp:DropDownList ID="DropDownList2" runat="server" 
                    DataSourceID="LinqDataSource1" DataTextField="ProvinceName" 
                    DataValueField="ProvinceId" AutoPostBack="True" 
                    onselectedindexchanged="DropDownList2_SelectedIndexChanged" Width="150px" 
                    AppendDataBoundItems="True" CssClass="textbox">
                </asp:DropDownList>
                <asp:LinqDataSource ID="LinqDataSource1" runat="server" 
                    ContextTypeName="Bus_proj.DataClasses1DataContext" EntityTypeName="" 
                    TableName="Provinces">
                </asp:LinqDataSource>
            </td>
        </tr>
        <tr>
            <td align="right" class="style5">
                <asp:Label ID="Label5" runat="server" Text="เพศ :"></asp:Label>
            </td>
            <td class="style6">
                <asp:DropDownList ID="DropDownList6" runat="server" Height="23px" 
                    CssClass="textbox">
                    <asp:ListItem>ชาย</asp:ListItem>
                    <asp:ListItem>หญิง</asp:ListItem>
                </asp:DropDownList>
            </td>
            <td class="style7">
                &nbsp;</td>
            <td align="right" class="style8">
                <asp:Label ID="Label11" runat="server" Text="เขต/อำเภอ"></asp:Label>
                :</td>
            <td>
                <asp:DropDownList ID="DropDownList3" runat="server" 
                    DataSourceID="LinqDataSource2" DataTextField="AmphurName" 
                    DataValueField="AmphurId" AutoPostBack="True" 
                    onselectedindexchanged="DropDownList3_SelectedIndexChanged" Width="150px" 
                    AppendDataBoundItems="True" CssClass="textbox">
                </asp:DropDownList>
                <asp:LinqDataSource ID="LinqDataSource2" runat="server" 
                    ContextTypeName="Bus_proj.DataClasses1DataContext" EntityTypeName="" 
                    TableName="Amphurs" Where="ProvinceId == @ProvinceId">
                    <WhereParameters>
                        <asp:ControlParameter ControlID="DropDownList2" Name="ProvinceId" 
                            PropertyName="SelectedValue" Type="Int32" />
                    </WhereParameters>
                </asp:LinqDataSource>
            </td>
        </tr>
        <tr>
            <td align="right" class="style5">
                <asp:Label ID="Label6" runat="server" Text="วัน-เดือน-ปีเกิด :"></asp:Label>
            </td>
            <td class="style6">
                <asp:TextBox ID="TextBox4" runat="server" TextMode="Date" CssClass="textbox"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="TextBox4"
                Display="Dynamic" ErrorMessage="Amount is required.">*</asp:RequiredFieldValidator>
            </td>
            <td class="style7">
                &nbsp;</td>
            <td align="right" class="style8">
                <asp:Label ID="Label10" runat="server" Text="แขวง/ตำบล"></asp:Label>
                :</td>
            <td>
                <asp:DropDownList ID="DropDownList4" runat="server" 
                    DataSourceID="LinqDataSource3" DataTextField="DistrictName" 
                    DataValueField="DistrictId" AutoPostBack="True" Width="150px" 
                    AppendDataBoundItems="True" CssClass="textbox">
                </asp:DropDownList>
                <asp:LinqDataSource ID="LinqDataSource3" runat="server" 
                    ContextTypeName="Bus_proj.DataClasses1DataContext" EntityTypeName="" 
                    TableName="Districts" Where="AmphurId == @AmphurId">
                    <WhereParameters>
                        <asp:ControlParameter ControlID="DropDownList3" Name="AmphurId" 
                            PropertyName="SelectedValue" Type="Int32" />
                    </WhereParameters>
                </asp:LinqDataSource>
            </td>
        </tr>
        <tr>
            <td align="right" class="style5">
                <asp:Label ID="Label13" runat="server" Text="รหัสไปรษณีย์ :"></asp:Label>
            </td>
            <td class="style6">
                <asp:TextBox ID="TextBox8" runat="server" CssClass="textbox"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="TextBox8"
                Display="Dynamic" ErrorMessage="Amount is required.">*</asp:RequiredFieldValidator>
            </td>
            <td class="style7">
                &nbsp;</td>
            <td align="right" class="style8">
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td align="right" class="style5">
                <asp:Label ID="Label14" runat="server" Text="อีเมล์ :"></asp:Label>
            </td>
            <td class="style6">
                <asp:TextBox ID="TextBox9" runat="server" TextMode="Email" CssClass="textbox"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="TextBox9"
                Display="Dynamic" ErrorMessage="Amount is required.">*</asp:RequiredFieldValidator>
            </td>
            <td class="style7">
                &nbsp;</td>
            <td align="right" class="style8">
                <asp:Label ID="Label19" runat="server" Text="ระยะทางสะสม :"></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="TextBox19" runat="server" ReadOnly="True" CssClass="textbox"></asp:TextBox>
                <asp:Label ID="Label22" runat="server" Text="กิโลเมตร"></asp:Label>
            </td>
        </tr>
        <tr>
            <td align="right" class="style5">
                <asp:Label ID="Label16" runat="server" Text="เบอร์โทรศัพท์ :"></asp:Label>
            </td>
            <td class="style6">
                <asp:TextBox ID="TextBox11" runat="server" CssClass="textbox"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" ControlToValidate="TextBox11"
                Display="Dynamic" ErrorMessage="Amount is required.">*</asp:RequiredFieldValidator>
            </td>
            <td class="style7">
                &nbsp;</td>
            <td align="right" class="style8">
                <asp:Label ID="Label20" runat="server" Text="ระยะทางคงเหลือ :"></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="TextBox20" runat="server" ReadOnly="True" CssClass="textbox"></asp:TextBox>
                <asp:Label ID="Label21" runat="server" Text="กิโลเมตร"></asp:Label>
            </td>
        </tr>
        <tr>
            <td align="right" class="style5">
                <asp:Label ID="Label23" runat="server" Text="ประเภทสมาชิก :"></asp:Label>
            </td>
            <td class="style6">
                <asp:DropDownList ID="DropDownList7" runat="server" 
                    DataSourceID="LinqDataSource4" DataTextField="Category_name" 
                    DataValueField="Category_id" Width="150px" Height="21px" 
                    CssClass="textbox">
                </asp:DropDownList>
                <asp:LinqDataSource ID="LinqDataSource4" runat="server" 
                    ContextTypeName="Bus_proj.DataClasses1DataContext" EntityTypeName="" 
                    TableName="Table_Categories">
                </asp:LinqDataSource>
            </td>
            <td class="style7">
                &nbsp;</td>
            <td align="right" class="style8">
                <asp:Button ID="Button1" runat="server" OnClientClick="return confirm('ยืนยันการแก้ไขข้อมูล')" Height="51px" onclick="Button1_Click" 
                    Text="แก้ไขข้อมูล" Width="134px" CssClass="classname" />
                </td>
            <td>
                <asp:Button ID="Button2" runat="server" OnClientClick="return confirm('ยืนยันการยกเลิกรายการ')" Height="51px" onclick="Button2_Click" 
                    Text="ยกเลิก" Width="109px" CssClass="classname" />
            </td>
        </tr>
        <tr>
            <td align="right" class="style5">
                &nbsp;</td>
            <td class="style6">
                &nbsp;</td>
            <td class="style7">
                &nbsp;</td>
            <td align="right" class="style8">
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
    </table>
&nbsp;
</fieldset>
    </ContentTemplate>
    </asp:UpdatePanel>


</asp:Content>

